package net.wanho.customerManage.service.impl;

import net.wanho.commons.exception.DaoException;
import net.wanho.commons.exception.ServiceException;
import net.wanho.commons.factory.BeanFactory;
import net.wanho.customerManage.dao.BusinessSourceDao;
import net.wanho.customerManage.dao.CustomerDao;
import net.wanho.customerManage.po.BusinessSource;
import net.wanho.customerManage.service.BusinessSourceService;

import java.util.List;

public class BusinessSourceServiceImpl implements BusinessSourceService {
    private BusinessSourceDao businessSourceDao = BeanFactory.getBean(BusinessSourceDao.class) ;
    @Override
    public List<BusinessSource> selectAllBusinessSource() throws ServiceException {
        try {
            return businessSourceDao.selectAllBusinessSource();
        } catch (DaoException e) {
            e.printStackTrace();
            throw new ServiceException(e.getMessage()) ;
        }
    }
}
